package com.okaram.KinderBooks;

import com.okaram.KinderBooks.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.webkit.WebView;
import android.widget.Toast;

public class KinderBooksActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }

    public void onRead(View v) {
    		Intent i=new Intent(this,BookReadActivity.class);
    		i.putExtra("path", (String)v.getTag());
		startActivity(i);
    }

    public void onAboutButton(View v) {
    		startActivity(new Intent(this,AboutKinderBooksActivity.class));
    }
    
    @Override public boolean onCreateOptionsMenu(Menu m) {
		new MenuInflater(this).inflate(R.menu.main,m);

    		return super.onCreateOptionsMenu(m);
    }
    
    @Override
    public boolean onOptionsItemSelected(MenuItem item)
    {
    		if(item.getItemId()==R.id.aboutMenu) {
        		startActivity(new Intent(this,AboutKinderBooksActivity.class));
    		}
    		return super.onOptionsItemSelected(item);
    }

}